let https = require('https')
let {
	par
} = require('../user')
module.exports = (req, res) => {
	https.get({
			hostname: 'aip.baidubce.com',
			path: '/oauth/2.0/token?' + par,
			agent: false
		},
		function(res) {
			res.setEncoding('utf8')
			res.on('data', function(data) {
				access_token = JSON.parse(data).access_token
			})
		}
	)
}
